import Vue from "vue";
let cardMessage = Vue.filter("cardMessage", function(value) {
	   if(value.length==11){
		   return value.replace(/^(.{3})(?:\w+)(.{4})$/, "$1****$2");
	   }else if(value.length==18){
		    return value.replace(/^(.{6})(?:\w+)(.{4})$/, "$1********$2");
	   }else{
		   return value.replace(/^(.{0})(?:\w+)(.{4})$/, "$1***************$2");
	   }
      
});

export default cardMessage;
